package singleton;

/**
 * 懒汉模式
 */
public class Child {

    private static Child child;

    private Child(){

    }

    public static Child getInstance(){
        if (child == null){
            child = new Child();
        }
        return child;
    }
}
